import 'dart:io';

import 'package:lax/utils/LxServer.dart';

Future<MiddleWareStatus> CROS(HttpRequest req, DeferFuncs funcs) async {
  //跨域配置
  req.response.headers.add('Access-Control-Allow-Origin', '*');
  req.response.headers.add('Access-Control-Allow-Credentials', 'true');
  req.response.headers.add('Access-Control-Allow-Methods', '*');
  req.response.headers
      .add('Access-Control-Allow-Headers', 'Content-Type,Access-Token');
  req.response.headers.add('Access-Control-Expose-Headers', '*');
  return NEXT;
}
